<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #chart {
      width: 400px;
      height: 400px;
    }
  </style>
  <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.0.0/echarts.min.js"></script>
</head>
<body>
  <div id="chart"></div>
  <script>
  const chartDOM = document.getElementById("chart")
  const chart = echarts.init(chartDOM, 'dark', { renderer: 'svg' })
  chart.setOption({
    title: {
      text: '学习 Echarts'
    },
    xAxis: {
      data: ['食品', '数码', '服饰', '箱包']
    },
    yAxis: {},
    series: {
      type: 'bar', // 柱状图
      data: [100, 120, 90, 150]
    }
  })
  </script>
</body>
</html>